import mitt from 'mitt'

export type MenuType = 'person' | 'video' | 'sensor' | 'alarm'

type Events = {
  'timeSeek': (progress: number) => void,
  'areaChange': (ids: string[] | null) => void,
  'emitSSEQuery': void,
  'timeProgress': (object: { progress: number; duration: number }) => void,
  'timePlay': (end: Boolean) => void,
  'timePause': void,
  'changeScene': void
}

const emiter = mitt<Events>()

export default emiter
